import request from '@/utils/request'

export function postPaperApply(value) {

    return request({
        url: '/Paper/submit',
        method: 'post',
        data: {
            title: value.title,
            content: value.paperAbstract,
            type: value.type,
            author: value.participantMembers,
            rank:value.teamRank,
        },
        headers: {}
    })
}

export function postPaperSearch(current,size) {

    return request({
        url: 'Paper/usersearch'+'?current='+current+'&size='+size,
        method: 'post',
        data: {
        },
        headers: {}
    })
}
export function postPaperDel(applicationId) {

    return request({
        url: 'Paper/delete'+'?applicationId='+applicationId,
        method: 'post',
        data: {
        },
        headers: {}
    })
}

export function postPaperAdminSearch(current,size,value) {

    return request({
        url: '/Paper/admin/search'+'?current='+current+'&size='+size,
        method: 'post',
        data: {
            status: value.status,
            type: value.type,
            finalLevel: value.finalLevel,
            uid: value.uid,
            startTime:value.startTime,
            endTime: value.endTime,
            stuClass: value.stuClass,
        },
        headers: {}
    })
}


export function postPaperUpdate(value) {

    return request({
        url: '/Paper/Update'+'?applicationId='+value.id,
        method: 'post',
        data: {
            title: value.title,
            content: value.paperAbstract,
            type: value.type,
            author:value.participantMembers,
            rank: value.teamRank
        },
        headers: {}
    })
}

export function postPaperEvidence(fd) {

    return request({
        url: '/Paper/evidence',
        method: 'post',
        data:fd,
        headers: {'Content-Type': 'multipart/form-data'}
    })
}

export function postPaperNoAward(id)
{
    return request({
        url: 'Paper/NoAward'+'?applicationId='+id,
        method: 'post',
        data: {
        },
        headers: {}
    })
}

export function postPaperAdminApplicate(id,isPass)
{
    return request({
        url: 'Paper/admin/applicate'+'?applicationId='+id+'&isPass='+isPass,
        method: 'post',
        data: {
        },
        headers: {}
    })
}

export function postPaperLevel(id,level,isPass)
{
    return request({
        url: '/Paper/admin/determine'+'?ids='+id+'&level='+level+'&isPass='+isPass,
        method: 'post',
        data: {
        },
        headers: {}
    })
}

export function postPaperAdminUpdate(id,level,isPass) {

    return request({
        url: '/Paper/admin/update'+'?id='+id+'&level='+level+'&isPass='+isPass,
        method: 'post',
        data: {
            
        },
        headers: {}
    })
}

export function postPaperAdminExport(value) {

    return request({
        url: '/Paper/admin/export',
        method: 'post',
        data: {
            status: value.status,
            type: value.type,
            finalLevel: value.finalLevel,
            stuName: value.stuName,
            startTime:value.startTime,
            endTime: value.endTime,
            stuClass: value.stuClass,
        },
        responseType: 'blob'
    })
}

export function postPaperAdminMulApplicate(applicationId,isPass)
{
    return request({
        url: 'Paper/admin/applicate'+'?applicationId='+applicationId+'&isPass='+isPass,
        method: 'post',
        data: {},
        headers: {}
    })
}

export function postPaperAdminDownloadEvidence(ids)
{
    return request({
        url: '/Paper/admin/DownloadEvidence'+'?ids='+ids,
        method: 'post',
        data: {},
        headers: {},
        responseType: 'blob'
    })
}